
<template>
  <div class="box">
    <!-- <img src="../../assets/imgs/adv1.jpg" class="adv" alt="" /> -->
    <img src=" https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/f89261d8655d76f2ab2340e4a3738678.jpg" class="adv" alt="" />
   
    <p class="type">
      <span>Xiaomi Civi</span>
      <span>Xiaomi 数字系列</span>
      <span>Xiaomi MIX系列</span>
      <span>Xiaomi 手机配件</span>
    </p>
    <div class="goods-show">
      <p class="show-title">XiaomiCiVi</p>
      <div
      v-for="(goodsinfo, index) in goodsinfos"  @click="changeContent(goodsinfo.id)" :key="index"
       class="show-box"> 
          <div class="left-img"><img :src="goodsinfo.img" alt="" /></div>
          <div class="right-info">
            <p>{{goodsinfo.name}}</p>
            <div>
              <p>
                ￥ <i>{{goodsinfo.price}}</i> 起
                <span>满减</span>
                <span>赠</span>
              </p>
            </div>
        </div>
      </div>
     

    <!-- 所有当前组件的子级路由组件，展示在此处 -->
  </div>
</template>

<script>
// import axios from "axios";
export default {
  // name: "Recommend",
  data() {
    return {
      
      // goodsinfos:""
    };
  },
  // created(){
  //   console.log("this.$route","/goods?type1="+this.$route.query.type2); //匹配到当前路由对象；
  //   axios({
  //     url:"/goods?type1="+this.$route.query.type
  //   })
  //   .then(res=>{
  //     console.log(res)
  //     this.goodsinfos=res.data
  //     // console.log(res.goodsinfos);
  //   })
  // }
};
</script>


 